home *** CD-ROM | disk | FTP | other *** search
- MSA-to-ST version 1.3
-
- =====================
-
- Copyright 1997 Damien Burke
-
- email: st@jetman.demon.co.uk
- WWW: http://www.jetman.demon.co.uk/st/index.html
-
- DESCRIPTION
- --===========-----------------------------------------------------------------
-
- MSA-to-ST converts Magic Shadow Archiver (MSA) files to .ST disk images for
- use with the Atari ST emulator, PacifiST. Both compressed and uncompressed
- archives are supported, as are disks that have been split into more than
- one MSA file.
-
- WHAT'S NEW IN VERSION 1.3?
- --==========================--------------------------------------------------
-
- Wildcards and filename completion - i.e. you need no longer supply an output
- filename (it'll guess it based on the input filename). This has the handy
- side-effect that you can now use drag and drop in Win95! Just drag the MSA
- file to convert onto the MSATOST.EXE icon (or a shortcut to it) and the file
- is automatically converted. An icon is supplied if you want to use it; I also
- recommend you set the properties of the EXE file so that the DOS box is
- closed after execution.
-
- You can now convert multiple files using wildcard characters in the input
- filename. In this case, you *cannot* supply an output filename - no point
- overwriting the same filename over and over again, is there?
-
- Also fixed one small bug - if converting an MSA file of precisely 80 tracks
- it would give a spurious 'not a full image' message. This never actually
- caused a problem, it was just a message!
-
- DISTRIBUTION
- --============----------------------------------------------------------------
- MSA-to-ST is freeware and unsupported. I take no responsibility for any data
- loss you may suffer (e.g. if you type the wrong filename in and overwrite
- something important). If you find bugs, mail me and I'll fix them. You may do
- what you want with the program provided you include this documentation
- unaltered, and do not alter the program itself.
-
- USAGE
- --=====-----------------------------------------------------------------------
-
- To use MSA-to-ST, type:
-
- MSATOST <name of MSA input file> [name of ST output file] [/Q] [/O]
-
- /Q - quiet mode - no screen output and no pauses for keyboard input
- /O - overwrite - if output file exists, overwrite without prompting
-
- If /Q is used without /O and an output file exists, it will *not* be
- overwritten and the program will *not* extract the archive at all. Both /Q and
- /O, if used, must be *after* the input/output filenames, for example:
-
- MSATOST INFILE.MSA OUTFILE.ST /Q /O
-
- ...extracts the disk in INFILE.MSA to the disk image OUTFILE.ST without
- any onscreen messages and overwriting the existing OUTFILE.ST file (if it
- exists).
-
- MSATOST INFILE.MSA
-
- ...extracts INFILE.MSA to INFILE.ST - the output filename is based on the
- input filename if you don't supply a specific output filename.
-
- MSATOST *.MSA
-
- ...extracts every MSA file in the current directory, using output filenames
- based on the input filenames as described above.
-
- While extracting, a progress bar is displayed. Each block in the bar indicates
- one track converted. Large blocks indicate compressed tracks and smaller
- blocks indicate uncompressed tracks.
-
- NOTES
- --=====-----------------------------------------------------------------------
-
- MSA-to-ST will return status codes of 0 for success or 1 for failure; you can
- check for these in a batch file by testing ERRORLEVEL or if you are running
- MSA-to-ST from within another program you can check by testing the return code
- you get from the execution.
-
- MULTI-MSA DISKS
- --===============-------------------------------------------------------------
-
- Disks that have been split into more than one MSA file (e.g. an 800Kb disk
- split into tracks 1 to 40 and 41 to 80 in order to keep two small MSA files
- that can fit onto 720Kb disks) should be handled correctly by MSA-to-ST, but
- if you find any problems please mail me. It doesn't matter what order you
- convert the MSA files, just make sure you use the same output file, e.g.:
-
- MSATOST 01_TO_40.MSA OUTFILE.ST
- MSATOST 41_TO_80.MSA OUTFILE.ST
-
- Any areas in the image not filled with data from an MSA file will be full of 0
- bytes and such an incomplete image will no doubt not be of any use until you
- complete it by converting all the appropriate MSA files. Also note that if you
- convert only the first part of a disk, the image file will be too short and
- PaCifiST may be unable to use it. I doubt this will be a problem but if it is
- mail me and I'll make the next version add blank bits to the end of the image
- in such a situation.
-
- .MSA FILE FORMAT
- --================------------------------------------------------------------
-
- For those interested, an MSA file is made up as follows:
-
- Header:
-
- Word ID marker, should be $0E0F
- Word Sectors per track
- Word Sides (0 or 1; add 1 to this to get correct number of sides)
- Word Starting track (0-based)
- Word Ending track (0-based)
-
- Individual tracks follow the header in alternating side order, e.g. a double
- sided disk is stored as:
-
- TRACK 0, SIDE 0
- TRACK 0, SIDE 1
- TRACK 1, SIDE 0
- TRACK 1, SIDE 1
- TRACK 2, SIDE 0
- TRACK 2, SIDE 1
-
- ...and so on. Track blocks are made up as follows:
-
- Word Data length
- Bytes Data
-
- If the data length is equal to 512 x the sectors per track value, it is an
- uncompressed track and you can merely copy the data to the appropriate track
- of the disk. However, if the data length value is less than 512 x the sectors
- per track value it is a compressed track.
-
- Compressed tracks use simple a Run Length Encoding (RLE) compression method.
- You can directly copy any data bytes until you find an $E5 byte. This signals
- a compressed run, and is made up as follows:
-
- Byte Marker - $E5
- Byte Data byte
- Word Run length
-
- So, if MSA found six $AA bytes in a row it would encode it as:
-
- $E5AA0006
-
- What happens if there's an actual $E5 byte on the disk? Well, logically
- enough, it is encoded as:
-
- $E5E50001
-
- This is obviously bad news if a disk consists of lots of data like
- $E500E500E500E500... but if MSA makes a track bigger when attempting to
- compress it, it just stores the uncompressed version instead.
-
- MSA only compresses runs of at least 4 identical bytes (after all, it would be
- wasteful to store 4 bytes for a run of only 3 identical bytes!). There is one
- exception to this rule: if a run of 2 or 3 $E5 bytes is found, that is stored
- appropriately enough as a run. Again, it would be wasteful to store 4 bytes
- for every single $E5 byte.
-
- The hacked release of MSA that enables the user to turn off compression
- completely simply stops MSA from trying this compression and produces MSA
- images that are completely uncompressed. This is okay because it is possible
- for MSA to produce such an image anyway, and such images are therefore 100%
- compatible with normal MSA versions (and MSA-to-ST of course).
-
- .ST FILE FORMAT
- --===============-------------------------------------------------------------
-
- The file format of the .ST image files used by PaCifiST is simplicity itself;
- they are just straight images of the disk in question, with sectors stored in
- the expected logical order. So, on a sector basis the images run from sector
- 0 (bootsector) to however many sectors are on the disk. On a track basis the
- layout is the same as for MSA files but obviously the data is raw, no track
- header or compression or anything like that.
-
- .ST files can be written to real disks using DKC's STImage program for the PC,
- available from my web site (see top of this document). If you have .ST files
- on your real ST you can write them to a disk using ArghBlarg's STTODSK.TTP
- program, also available from my web site.
-
- You can also use MSAtoST's companion program, STtoMSA, to convert .ST files to
- MSA files. That is also available from my web site.
-
- --
- Damien Burke
- 31st August 1997
-